export const routerConfig = () =>{
    const router = [
        {
            path: "/",
            redirect: "/login",
        },
        {
            name: 'home',
            path: "/home",
            meta:{
                title:"首页",
                commons:true,
                menu:"1"
            },
            // @ts-ignore
            component: () => import("/src/pages/home/index.vue"),
            children:[
                {
                    path: "",
                    name: 'console',
                    redirect: "/home/console",
                    menu:"1"
                },
                {
                    name: 'console',
                    path: "/home/console",
                    meta:{
                        title:"控制台",
                        commons:true,
                        menu:"10"
                    },
                    component: () => import("@/pages/home/console.vue"),
                    children:[]
                },
                {
                    path: '/home/user2/:postId(\\d+)',
                    component: () => import('@/pages/home/cadre/aar/authUser2.vue'),
                    name: 'AuthUser',
                    meta: { title: '任免管理', activeMenu: '/ganbu/post' }
                },
                //用户管理
                {
                    name: 'userIn',
                    path: "/home/user",
                    children:[
                        {
                            name: '',
                            path: "/home/user",
                            redirect: "/home/user/me",
                        },
                        {
                            name: 'user-me',
                            path: "/home/user/me",
                            meta:{
                                title:"修改个人信息",
                                commons:true,
                                menu:"9"
                            },
                            component: () => import("@/pages/home/user/me.vue"),
                        }
                    ]
                }
            ]
        },
        {
            path: "/login",
            name: 'login',
            meta:{
                title:"登录",
                commons:true
            },
            component: () => import("@/pages/login.vue"),
        },
        //app
        {
            name: 'demo',
            path: "/app/demo",
            meta:{
                title:"DEMO测试",
                commons:true,
            },
            component: () => import("@/pages/app/demo/demo.vue"),
        },
    ]
    return router
}